#include "comm.h"


int main()
{
    int wfd = open(FILENAME, O_WRONLY);
    if(wfd < 0)
    {
        perror("open");
        return 1;
    }
    
    std::string message;
    while(true)
    {
        std::getline(std::cin, message);

        ssize_t s = write(wfd, message.c_str(), message.size());
        if(s < 0)
        {
            perror("write");
            return -1;
        }
    }
}